=====================================================
 : Question Img
 : 1.0
-----------------------------------------------------
 : MSW
 :  http://0-web.ru/
-----------------------------------------------------
 Copyright (c) 2012 MSW
=====================================================
     
=====================================================

1. : /engine/modules/functions.php
:
=====================================================
if( ! defined( 'DATALIFEENGINE' ) ) {
	die( "Hacking attempt!" );
}
=====================================================

 :
=====================================================
#****** Question Img * by MSW ******#
function question_img($i) {
	$img = ( substr($i[1], 0, 4)=="http" ) ? $i[1] : "/uploads/question/{$i[1]}";
	return "<br><img src=\"{$img}\" />";
}
=====================================================


2. : /engine/modules/register.php
:
=====================================================
$tpl->set( '{question}', htmlspecialchars( stripslashes( $question['question'] ), ENT_QUOTES ) );
=====================================================
:
=====================================================
$tpl->set( '{question}', htmlspecialchars( stripslashes( $question['question'] ), ENT_QUOTES, $config['charset'] ) );
=====================================================

 :
=====================================================
#****** Question Img * by MSW ******#
			$question['question'] = preg_replace_callback( "#\[img=(.+?)\]#is", "question_img", $question['question'] );
			$tpl->set( '{question}', stripslashes( $question['question'] ) );
#****** Question Img * by MSW ******#
=====================================================


3. : /engine/modules/show.full.php
:
=====================================================
$tpl->set( '{question}', "<span id=\"dle-question\">".htmlspecialchars( stripslashes( $question['question'] ), ENT_QUOTES )."</span>" );
=====================================================
:
=====================================================
$tpl->set( '{question}', "<span id=\"dle-question\">".htmlspecialchars( stripslashes( $question['question'] ), ENT_QUOTES, $config['charset'] )."</span>" );
=====================================================

 :
=====================================================
#****** Question Img * by MSW ******#
			$question['question'] = preg_replace_callback( "#\[img=(.+?)\]#is", "question_img", $question['question'] );
			$tpl->set( '{question}', "<span id=\"dle-question\">".stripslashes( $question['question'] )."</span>" );
#****** Question Img * by MSW ******#
=====================================================


4.  : /uploads/question
   , : 1.jpg
 :
=====================================================
   ? [img=1.jpg]
=====================================================